<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
      <%@ page import="java.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="mani.css" rel="stylesheet" type="text/css" />
<title></title>



</head>
<body>
<div class="shape">
<div id="wrapper">
  <div id="header">
    <div id="logo">
      
    </div>
    <!-- end div#logo -->
  </div>
  <!-- end div#header -->
  <div id="menu">
    <ul>
 <li  class="active"><a href="index.jsp">HOME</a></li>
      
       <li><a href="index.jsp">Logout</a></li>
      
    </ul>
  </div>
  <!-- end div#menu -->
 
  <div id="page">
    <div id="page-bgtop">
      <div id="content">
        <div class="post">
         
          <p class="byline"><div id="center-backgd">
            <table style="background:url(images/cloth_28.jpg) repeat top left;" width="896" height="49">
              <tr>
                <td width="30">&nbsp;</td>
                <td width="854"><table width="853" height="424" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="275" height="15" align="center" valign="top">&nbsp;</td>
                    <td width="36">&nbsp;</td>
                  </tr>
                  <tr>
                    <td height="386">
                    
                    <%
//PrintWriter out = response.getWriter();
                    String fname=request.getParameter("search1");
            		String lname=request.getParameter("search");
            		String name=null,uname=null,password=null;
            		
            	
            				ResultSet rs;	
            			
            			
            			
            			try {
            				
            				 
            				 Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
            				  java.sql.Connection conn=DriverManager.getConnection("jdbc:odbc:webcontent","sa","test");
            				String sql = "select * from webcontent where rvalue='"+fname+"'" ;
            				
            				Statement s = conn.createStatement();
            				s.executeQuery (sql);
            				rs = s.getResultSet();
            				while (rs.next ())
            				{
            					
            					name=rs.getString("url");
            					uname=rs.getString("keywords");
            					
            				}
            				rs.close ();
            				s.close ();
            				}catch(Exception e){
            				System.out.println("Exception is ;"+e);
            				}
            				try {
                				
               				 
               				 Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
               				  java.sql.Connection conn=DriverManager.getConnection("jdbc:odbc:webcontent","sa","test");
               				String sql = "delete from webcontent where rvalue='"+fname+"'" ;
               				
               				Statement s = conn.createStatement();
               				s.executeQuery (sql);
               				
               				
               				s.close ();
               				}catch(Exception e){
               				System.out.println("Exception is ;"+e);
               				}
            				try {               
				            String sss;
					        int rs1;
							Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
							java.sql.Connection con = DriverManager.getConnection("jdbc:odbc:webcontent","sa","test");
							Statement s= con.createStatement();
		                     
							rs1=s.executeUpdate("insert into webcontent1(url,keywords,ranking) values('"+name+"','"+uname+"','"+lname+"')");
											
										
										
									}
									catch (Exception e1) {
		
										e1.printStackTrace();
									}
		
		
                		         %>
                		         <jsp:forward page="index.html"></jsp:forward>
                		         <%	 
           		         	 
            				
		
            		
         
            		
%>
                    
                    
                    </td>
                  </tr>
                  <tr>
                    <td height="19">&nbsp;</td>
                  </tr>
                </table></td>
              </tr>
            </table>
          </div></p>
          <div class="meta"> </div>
        </div>
      </div>
      
      <!-- end div#content -->
      <!-- end div#sidebar -->
      <div style="clear: both; height: 1px"></div>
    </div>
  </div>
  <!-- end div#page -->
  <div id="footer">
    <p>Copyright &copy; 2010y <a href="http://www.freecsstemplates.org/">@axess.com</a></p>
    <p id="links"><a href="#">Privacy Policy</a> | <a href="#">Terms of Use</a></p>
  </div>
  <!-- end div#footer -->
</div>
<!-- end div#wrapper -->
</div>
<!-- end shape -->
</body>
</html>